package edu.webarchitechture.bank.ejb3.services;

import edu.webarchitechture.bank.ejb3.exception.CustomerNotFoundException;
import edu.webarchitechture.bank.ejb3.exception.InvalidParameterException;
import edu.webarchitechture.bank.ejb3.domain.Customer;

import java.util.List;

import javax.ejb.Remote;
import javax.ejb.Local;

/**
 * The interface to manage customer related functions.
 *
 * @author Inoka Dissanayaka.
 */
@Local
public interface CustomerManager {

    Long createCustomer(Customer customer) throws InvalidParameterException;

    List<Customer> getCustomersOfAccount(Long accountId) throws InvalidParameterException;

    List<Customer> getCustomersOfLastName(String lastName) throws InvalidParameterException;

    Customer getCustomer(Long customerId) throws CustomerNotFoundException, InvalidParameterException;

    void removeCustomer(Long customerId) throws CustomerNotFoundException, InvalidParameterException;

    void setAddress(String street, String city, String state, String zip, String phone,
                    String email, Long customerId) throws CustomerNotFoundException, InvalidParameterException;

    void setName(String lastName, String firstName, String middleInitial, Long customerId)
            throws CustomerNotFoundException, InvalidParameterException;
}
